<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../css/index.css" />
    <link rel="stylesheet" type="text/css" href="../css/menu.css" />
    <script src="../js/jquery-3.7.1.js"></script>
    <title>家园点评系统</title>
</head>
<body>
    <div class="menuArea">
        <div class="title">家园点评系统</div>
        <div class="menuBox">
            <div class="menu" id="institude_M"><span class="institude_icon"></span>机构管理</div>
            <div class="menu" id="activity_M"><span class="activity_icon"></span>活动管理</div>
        </div>
    </div>
    <div class="viewArea">
        <iframe src="activityManagement.html" width="600" height="400"></iframe>
    </div>
</body>
<script>
    $(document).ready(function (){
        // $("#activity_M").addClass("menu_alive");
        // $("iframe").attr("src", "activityManagement.html");
        $("#institude_M").addClass("menu_alive");
        $("iframe").attr("src", "institutionManagement.html");
    });
    $(window).resize(function (){
        $(".viewArea").width = window.innerWidth - $(".menuArea").width();
    });
    $(".menu").click(function (){
        $(".menu").removeClass("menu_alive");
        $(this).addClass("menu_alive");
        switch ($(this).attr('id').toString()){
            case "institude_M":
                $("iframe").attr("src", "institutionManagement.html");
                break;
            case "activity_M":
                $("iframe").attr("src", "activityManagement.html");
                break;
            default:
                console.log("aaaa")
                $("iframe").attr("src", "institutionManagement.html");
        }
    });
</script>
</html>